import { createApp } from 'vue'
import App from './App.vue'
import { createRouter, createWebHistory } from "vue-router";
import * as Sentry from "@sentry/vue";
import { Integrations } from "@sentry/tracing";
const Home = () => import(/* webpackChunkName: "home" */'./components/home.vue');
const Hello = () => import(/* webpackChunkName: "hello" */'./components/HelloWorld.vue');

const app = createApp(App);

const router = new createRouter({
    history: createWebHistory(),
    routes: [
      { path: '/home', component: Home },
      { path: '/hello', component: Hello }
    ]
})
Sentry.init({
    app,
    dsn: "http://de12184cbb9d4792b8577be530ee0618@101.37.28.32:9000/2",
    environment: 'localhost',
    integrations: [
        new Integrations.BrowserTracing({
          routingInstrumentation: Sentry.vueRouterInstrumentation(router),
          tracingOrigins: ["localhost", "my-site-url.com", /^\//],
        }),
    ],
    // Set tracesSampleRate to 1.0 to capture 100%
    // of transactions for performance monitoring.
    // We recommend adjusting this value in production
    tracesSampleRate: 1.0,
  });

app.use(router).mount('#app')
